# 向量相加
add_executable(vectorAdd vectorAdd.cu)
# 异步调用核函数
add_executable(asyncAPI asyncAPI.cu)
# 查询显卡信息
add_executable(deviceQuery deviceQuery.cpp)
# 在核函数中使用struct
add_executable(simpleStruct simpleStruct.cu)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    # 用于开启调试
    target_compile_options(vectorAdd PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-G>)
endif()

include_directories("${CUDA_ROOT}/include")
include_directories(${PROJECT_SOURCE_DIR}/include)

target_link_libraries(deviceQuery ${CUDA_LIBRARIES})